import { ref, onMounted,computed  } from "vue";
import axios from "axios";

export default () => {
  // 数据
  let sum = ref(0);
 let bigSum = computed(()=>{
  return sum.value * 10
 })
  // 方法
  const sumChange = () => {
    sum.value += 1;
  };
// 钩子
onMounted(()=>{
 sumChange()
})

  // 给外部提供方法
  return { sum, sumChange,bigSum };
};
